<?php
namespace App\Model\Device;

use App\Model\Base;
use App\Model\BaseModel;

class DeviceInfoModel extends BaseModel
{

	public $tableName = "sc_device_info";

	/**
	 * 通过条件获取数据库里面的用户
	 * @auth   xiaozhi
	 * @param  array   $condition [description]
	 * @return [type]             [description]
	 */
	public function getDepData($condition = [], $columns = '*')
    {

		// 获取正常的内容
		$this->db->where("status", 1);


		if(!empty($condition['id'])) {
			$this->db->where("id", $condition['id']);
		}

		$this->db->orderBy("id", "desc");
		$data = $this->db->get($this->tableName,null,$columns);

		return $data;

	}

}